Support bundle mode for inline Python tasks#34
Merged
Conversation
Assisted-By: devx/b49d7847-4e8a-45eb-8304-dacd6e78458e
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
modeandresolve_rootcontrols to the inline Python@taskpath:@task(..., mode=..., resolve_root=...)CallableRef<stem>.components.yamllocal_from_pythonentriesCallableRef.materialize()This reuses the existing
components generate from-python --mode bundle/module_bundler.pymachinery; it does not add a new bundler.Why
Pipeline inline
@taskcomponents currently auto-emitlocal_from_pythonsidecars in default inline mode only. That means generated task runtimes can depend on the container image already shipping first-party Python modules.For the compile OSS migration, the downstream Discovery Daily Pulse combine-run-data proof needs inline
@taskwrappers to bundle first-party modules (for examplerelevance_tools.eval.combine_run_data_core) so the generated component is self-contained with respect to first-party source. External dependencies still come from the image, as they do for standalone bundle mode.This PR is part 1 of the stack. A downstream Discovery change will bump this submodule commit and switch the combine-run-data inline wrappers to
mode="bundle".Tests
git diff --checkuv run ruff check packages/tangle-cli/src/tangle_cli/python_pipeline/task.py packages/tangle-cli/src/tangle_cli/python_pipeline/ref.py packages/tangle-cli/src/tangle_cli/pipeline_compiler.py tests/test_pipeline_compiler.py tests/test_pipelines_cli.pyuv run pytest tests/test_component_from_func.py tests/test_pipeline_compiler.py tests/test_pipelines_cli.py -q— 253 passedAI-assisted.